<template>
    <div class="home-layout">
        <transition name="el-fade-in-linear">
            <Covering v-if="loading" />
        </transition>

        <transition name="el-fade-in-linear">
            <router-view class="child-view" :key="$route.fullpath"></router-view>
        </transition>
    </div>
</template>
<script>
import ResizeMixin from './mixin/ResizeHandler'
import Covering from '../components/covering'

export default {
    mixins: [ResizeMixin],
    components: {
        Covering,
    },
    mounted() {
        setTimeout(() => {
            this.loading = false
        }, 800)
    },

    data() {
        return {
            loading: true,
        }
    },
}
</script>

<style lang="scss">
.home-layout {
    min-width: 1300px;
}

.v-enter {
    opacity: 0;
    transform: translateX(100%);
}

.v-leave-to {
    opacity: 0;
    transform: translateX(-100%);
    position: absolute;
}

.v-enter-active,
.v-leave-active {
    transition: all 0.5s ease;
}

.mobile {
    .home-layout {
        min-width: auto;
    }
}
</style>
